package com.frikinet.tools.gui;

import java.awt.Component;

import javax.swing.JToolBar;

import com.frikinet.tools.i18n.FI18N;
import com.frikinet.tools.i18n.Translable;

public class FToolBar extends JToolBar implements Translable
{
	private static final long serialVersionUID = 1L;
	
	private FI18N i18n = null;
	
	public FI18N getI18n()
	{
		return i18n;
	}

	public void setI18N(FI18N i18n)
	{
		this.i18n = i18n;
	}
	
	public void translate()
	{
		for(Component c: getComponents())
		{
			if(c instanceof Translable)
				((Translable)c).translate();
		}
	}
}
